﻿using System;
using ZX.Web.UI.Controls;

namespace ZX.WebApp.forum
{
    public partial class ThreadPage : forumPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public string GetUserInfo(object userID)
        {
            if (userID == null)
            {
                return "";
            }
            ZX.BLL.Extend.BaseBussnies bll = new ZX.BLL.Extend.BaseBussnies();
            System.Data.DataTable dt = bll.GetDataBySqlComm(string.Format(@"select hrEmployee.CName,DatPost.PostName,
substring(DatDepartment.LDeptName,Len(DatDepartment.LDeptName)-LEN('中旭股份->董事会'),Len(DatDepartment.LDeptName)) as DeptName from DatUser,hrEmployee,DatPost,DatDepartment
where DatUser.EmpID=hrEmployee.ID and hrEmployee.PostID=DatPost.PostID
and hrEmployee.DepartmentID=DatDepartment.DeptID and UserID='{0}'
", userID));
            if (dt == null)
            {
                return "";
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    return dt.Rows[0].ItemArray[0].ToString() + "(<font color='blue'>" + dt.Rows[0].ItemArray[1].ToString()+"</font>)";
                }
                return "";
            }
        }
    }
}